package br.ucb.rest.controle.action;
//asadsdasd
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.interceptor.ServletResponseAware;

import br.ucb.rest.persistencia.HibernateUtil;

import com.opensymphony.xwork2.ActionSupport;

public abstract class AbstractAction extends ActionSupport implements ServletRequestAware, ServletResponseAware {
	private static final long serialVersionUID = -2341556123803660365L;
	
	protected HttpServletResponse response;
	protected HttpServletRequest request;
	
	protected HibernateUtil hibernate;
	
	protected String msg;
	
	protected AbstractAction() {
		super();
		this.hibernate = HibernateUtil.getInstance();
	}
	
	@Override
	public void setServletResponse(HttpServletResponse response) {
		this.response = response;
	}

	@Override
	public void setServletRequest(HttpServletRequest request) {
		this.request = request;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public String getMsg() {
		return msg;
	}
	public HttpServletRequest getRequest() {
		return this.request;
	}

}
